from PyCmpltrtok.common import sep

sep()
a = [1, 2, 3, 4, 5]
b = [11, 22, 33, 44, 55, 66]
c = [111, 222, 333, 444]

z = zip(a, b, c)
print(z)
result = list(z)
print(result)
result = [list(x) for x in result]

sep()
import itertools
z = zip(itertools.cycle(a), b, itertools.cycle(c))
print(z)
result = list(z)
print(result)
result = [list(x) for x in result]

sep()
length_list = [len(x) for x in (a, b, c)]
print('length list:', length_list)

max_length = -1
for length in length_list:
    if length > max_length:
        max_length = length
print('max length:', max_length)

# a = a + [None] * (max_length - len(a))
# c = c + [None] * (max_length - len(c))
abc = [x + [None] * (max_length - len(x)) for x in (a, b, c)]
a, b, c = abc
print('a:', a)
print('b:', b)
print('c:', c)

result = list(zip(*abc))
print(result)
